package javaseof10day.day4.pm;

import java.util.Date;



public class UserLoginDemo {

	public static void main(String[] args) {

		//注册一个用户
		
		
		
		int id=1;
		int old=35;
		String name="mastudy";
		String password="123456";
		String faceimg="face.jpg";
		String email="1261639911@qq.com";

		
		
	
		reg(id, old, name, password, faceimg, email);
		
		

		
		dologin(name, password);
		
		

		
	}

	public static  Users reg(int id,int old, String name, String password, String faceimg, String email) {

		Users users = new Users();

		users.setId(id);
		users.setOld(old);

		users.setName(name);
		users.setPassword(password);
		users.setFaceimg(faceimg);
		users.setEmail(email);
		users.setCreateTime(new Date());
			
		
		
		return users;
		

	}

	public static boolean dologin(String name,String password) {
		
		
		if(name=="admin" && password =="admin") {
			
			return true;
			
		}else {
			return false;
		}
		


	}

}
